/*
 * ExtXml.h
 *
 *  Created on: 07.11.2011
 *      Author: Pavel Sinay
 */

#ifndef EXTXML_H_
#define EXTXML_H_

#include <vector>

#include "../../common/rapidxml-1.13/rapidxml.hpp"
#include "../../common/rapidxml-1.13/rapidxml_print.hpp"

namespace net {

class ExtXml: public rapidxml::xml_document<> {
public:
	ExtXml();
	ExtXml(const std::vector<char> &vector);
	ExtXml(const std::string &string);
	ExtXml(const ExtXml &ext_xml);
	virtual ~ExtXml();

	void fromVector(const std::vector<char> &vector);
	std::vector<char> toVector() const;
	void fromString(const std::string &string);
	std::string toString() const;

	bool operator==(const ExtXml &ext_xml) const;
	void operator=(const ExtXml &ext_xml);

private:
	std::vector<char> m_vector;
};

}

#endif /* EXTXML_H_ */
